﻿using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
using System.Text;

namespace Maikebing.Data.Taos
{
    public class TaosErrorResult
    {
        /// <summary>
        /// 
        /// </summary>
        public string status { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public int code { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string desc { get; set; }
    }
    public class TaosResult
    {
        /// <summary>
        /// 
        /// </summary>
        public string status { get; set; }

        private List<string> _head;
        /// <summary>
        /// 
        /// </summary>
        public List<string> head
        {
            get
            {
                if (_head == null)
                {
                    _head = new List<string>();
                    if (column_meta is JArray ja)
                    {
                        foreach (var jToken in ja)
                        {
                            _head.Add(jToken[0].ToString());
                        }
                    }
                }
                return _head;
            }
            set
            {
                _head = value;
            }
        }

        public object column_meta { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public object data { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public int rows { get; set; }
    }


}
